/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class AddressErcHolder extends BaseEntity {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column address_erc_holder.address
     *
     * @mbg.generated
     */
    private String address;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column address_erc_holder.contract_address
     *
     * @mbg.generated
     */
    private String contractAddress;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column address_erc_holder.balance_amount
     *
     * @mbg.generated
     */
    private String balanceAmount;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column address_erc_holder.create_timestamp
     *
     * @mbg.generated
     */
    private Date createTimestamp;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column address_erc_holder.update_timestamp
     *
     * @mbg.generated
     */
    private Date updateTimestamp;

    /**
     * 当前ERC20的，余额百分比； 计算参数，无入库；
     */
    private String balancePercertRateOfCurrentErcToken;
    /**
     * 当前ERC20的总转移数目 计算参数，无入库；
     */
    private int transferNumberOfCurrentErcToken;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column address_erc_holder.address
     *
     * @return the value of address_erc_holder.address
     * @mbg.generated
     */
    public String getAddress() {
        return address;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column address_erc_holder.address
     *
     * @param address the value for address_erc_holder.address
     * @mbg.generated
     */
    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column address_erc_holder.contract_address
     *
     * @return the value of address_erc_holder.contract_address
     * @mbg.generated
     */
    public String getContractAddress() {
        return contractAddress;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column address_erc_holder.contract_address
     *
     * @param contractAddress the value for address_erc_holder.contract_address
     * @mbg.generated
     */
    public void setContractAddress(String contractAddress) {
        this.contractAddress = contractAddress == null ? null : contractAddress.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column address_erc_holder.balance_amount
     *
     * @return the value of address_erc_holder.balance_amount
     * @mbg.generated
     */
    public String getBalanceAmount() {
        return balanceAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column address_erc_holder.balance_amount
     *
     * @param balanceAmount the value for address_erc_holder.balance_amount
     * @mbg.generated
     */
    public void setBalanceAmount(String balanceAmount) {
        this.balanceAmount = balanceAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column address_erc_holder.create_timestamp
     *
     * @return the value of address_erc_holder.create_timestamp
     * @mbg.generated
     */
    public Date getCreateTimestamp() {
        return createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column address_erc_holder.create_timestamp
     *
     * @param createTimestamp the value for address_erc_holder.create_timestamp
     * @mbg.generated
     */
    public void setCreateTimestamp(Date createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column address_erc_holder.update_timestamp
     *
     * @return the value of address_erc_holder.update_timestamp
     * @mbg.generated
     */
    public Date getUpdateTimestamp() {
        return updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column address_erc_holder.update_timestamp
     *
     * @param updateTimestamp the value for address_erc_holder.update_timestamp
     * @mbg.generated
     */
    public void setUpdateTimestamp(Date updateTimestamp) {
        this.updateTimestamp = updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table address_erc_holder
     *
     * @mbg.generated
     */
    public String getBalancePercertRateOfCurrentErcToken() {
        return balancePercertRateOfCurrentErcToken;
    }

    public void setBalancePercertRateOfCurrentErcToken(String balancePercertRateOfCurrentErcToken) {
        this.balancePercertRateOfCurrentErcToken = balancePercertRateOfCurrentErcToken;
    }

    public int getTransferNumberOfCurrentErcToken() {
        return transferNumberOfCurrentErcToken;
    }

    public void setTransferNumberOfCurrentErcToken(int transferNumberOfCurrentErcToken) {
        this.transferNumberOfCurrentErcToken = transferNumberOfCurrentErcToken;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AddressErcHolder)) return false;
        AddressErcHolder that = (AddressErcHolder) o;
        return getTransferNumberOfCurrentErcToken() == that.getTransferNumberOfCurrentErcToken() &&
                Objects.equals(getAddress(), that.getAddress()) &&
                Objects.equals(getContractAddress(), that.getContractAddress()) &&
                Objects.equals(getBalanceAmount(), that.getBalanceAmount()) &&
                Objects.equals(getCreateTimestamp(), that.getCreateTimestamp()) &&
                Objects.equals(getUpdateTimestamp(), that.getUpdateTimestamp()) &&
                Objects.equals(getBalancePercertRateOfCurrentErcToken(), that.getBalancePercertRateOfCurrentErcToken());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getAddress(), getContractAddress(), getBalanceAmount(), getCreateTimestamp(), getUpdateTimestamp(), getBalancePercertRateOfCurrentErcToken(), getTransferNumberOfCurrentErcToken());
    }
}